package com.wang.android.library;

import android.content.Context;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;

import com.wang.android.library.helper.WUnCeHandler;


/**
 * @ClassName FBaseApplication
 * @author  WangHuanyu
 * @todo
 * @date 2016/11/8 16:25
 */
public class FBaseApplication extends MultiDexApplication {
    private static FBaseApplication instance;

    public static FBaseApplication getInstance()
    {
        return instance;
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }

    @Override
    public void onCreate() {
        super.onCreate();
//        init();
        instance = this;
    }

    private void init() {
        WUnCeHandler catchExcep = new WUnCeHandler(this);
        Thread.setDefaultUncaughtExceptionHandler(catchExcep);
    }
}
